/**
 * Created by yzdd on 2018/6/4.
 */
import React, {Component} from 'react';
import {
  View,
  Text,
  StyleSheet,
  Image,
  TextInput,
  TouchableOpacity
} from 'react-native';
import {publicStyle, width} from "../utils/publiscStyle";
import DeliveryManagement from "./DeliveryManagement";

const styles = StyleSheet.create({
  item: {
    alignItems: "center",
    justifyContent: "center",
    width: (width - 60) / 2,
    height: 125,
    marginLeft: 10,
    marginRight: 10,
    borderRadius: 10,
    marginTop: 15
  },
  icon2: {
    width: 40,
    height: 40,
  },
  font2: {
    fontSize: 14,
    color: "#FFFFFF",
    marginTop:11
  },
  container: {
    flexDirection: "row",
    paddingLeft: 10,
    paddingRight: 10
  }
});
const fahuoIcon = require("../assets/fahuo.png");

export default class SupplierManagment extends Component {
  static navigationOptions = {
    title: "供应链管理"
  }
  toDeliveryManage = ()=>{
    const {navigate} = this.props.navigation;
    navigate("DeliveryManagement")
  }
  render() {
    return (
      <View style={[publicStyle.container, styles.container]}>
        <TouchableOpacity style={[styles.item, {backgroundColor: "#F57F31"}]} onPress={this.toDeliveryManage}>
          <Image
            source={fahuoIcon}
            resizeMode={"contain"}
            style={styles.icon2}
          />
          <Text style={styles.font2}>发货管理</Text>
        </TouchableOpacity>
        <View style={[styles.item, {backgroundColor: "#28BA25"}]}>
          <Image
            source={fahuoIcon}
            resizeMode={"contain"}
            style={styles.icon2}
          />
          <Text style={styles.font2}>其他</Text>
        </View>
      </View>
    );
  }
}